[EventTiming] Implement durationThreshold This CL implements a durationThreshold member of PerformanceObserverInit which enables setting a threshold for the event timing entries received by a PerformanceObserver. The entries are still buffered per the default duration threshold of 104 for now. Tests are added for various threshold values. PR: https://github.com/WICG/event-timing/pull/82 Bug: 543598 Change-Id: Id3407ddbcd1713fc33036518bbf88696add423cc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159611 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#762168} 
diff --git a/event-timing/min-duration-threshold.html b/event-timing/min-duration-threshold.html new file mode 100644 index 0000000..443b38a --- /dev/null +++ b/event-timing/min-duration-threshold.html 
@@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset=utf-8 /> +<title>Event Timing: PerformanceObserver with a durationThreshold less than 16</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/resources/testdriver.js></script> +<script src=/resources/testdriver-vendor.js></script> +<script src=resources/event-timing-test-utils.js></script> +<div id='myDiv'>Click me</div> +<script> +promise_test(async t => { + return testDuration(t, 'myDiv', numEntries=5, dur=0, fastDur=0, slowDur=20); +}, "PerformanceObserver with durationThreshold of 0 sees events of duration >= 16"); +</script> +</html>